#ifndef _DCC_H
#define _DCC_H

typedef struct {
	u8 status;
	u8 permited;
	u32 timer;
	char IP[20];
	u16 port;
	u32 id;
	int sock;
	char NickName[256];
	char filename[512];
	FILE* File;
	u32 CurPos;
	u32 size;
	char InBuf[1024];
	u16 InBufSize;
	u8 newDCC;
} DCC_info;

#define DelayedCloseSocket(socket) { \
   shutdown(socket, SHUT_RDWR);\
	ClosingSocks[ClosingSocksCount] = socket;\
	ClosingSocksCount++;\
	ClosingSocksTimer = 600;\
	socket = -1;}

#define PacketSize 5096

void DCC_Update();
void DCC_Message(u8 ServerNum, char* NickName, char* Command);
void DCC_ChatOutMsg(u8 ServerNum, u32 WinNum, char* MyNick, char* Text);
void DCC_OutChat(u8 ServerNum, char* NickName);
void DCC_OutSend(u8 ServerNum, char* NickName, char* FileName);

#endif
